package com.woniuxy.mapper.impl;

import com.woniuxy.mapper.EmpDao;
import com.woniuxy.entity.Emp;

import java.util.List;

/**
 * @author 作者
 * @create 2025-06-17 15:56
 */
public class EmpDaoImpl implements EmpDao {
    @Override
    public Emp selectByEid(int eid)throws  Exception {
        return JdbcUtil.executeQueryOne(JdbcUtil.getConnection(),
                Emp.class, "select * from emp where eid=?",eid);
    }

    @Override
    public List<Emp> selectAll()throws  Exception {
        return JdbcUtil.executeQuery(JdbcUtil.getConnection(),
                Emp.class, "select * from emp");
    }
}
